/*
 * Copyright [2025] [JinBooks of copyright http://www.jinbooks.com]
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package com.jinbooks.entity.channel;

import java.io.Serial;
import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import com.jinbooks.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 渠道/合作方实体类
 *
 * @author your-name
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("jbx_partner")
public class Partner extends BaseEntity {
    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 部门组织ID
     */
    @TableField("org_id")
    private String orgId;

    /**
     * 手机号
     */
    @TableField("phone")
    private String phone;

    /**
     * 编号 yyMMdd+6位随机数
     */
    @TableField("code")
    private String code;

    /**
     * 名称
     */
    @TableField("name")
    private String name;

    /**
     * 别名
     */
    @TableField("alias")
    private String alias;

    /**
     * 名字全称/营业执照名称
     */
    @TableField("full_name")
    private String fullName;

    /**
     * Logo/图标
     */
    @TableField("icon")
    private String icon;

    /**
     * 业务类型
     */
    @TableField("business_type")
    private String businessType;

    /**
     * 经营时间
     */
    @TableField("business_time")
    private String businessTime;

    /**
     * 入驻时间
     */
    @TableField("entry_time")
    private Date entryTime;

    /**
     * 合作方类型 VIP:会员 FLOW:流量 API:api接入
     */
    @TableField("partner_type")
    private String partnerType;

    /**
     * 内部收银-IN 外部收银-OUT
     */
    @TableField("cashier_type")
    private String cashierType;

    /**
     * 渠道编号
     */
    @TableField("channel_id")
    private String channelId;

    /**
     * 撞库校验渠道
     */
    @TableField("hitlib_channel_id")
    private String hitlibChannelId;

    /**
     * 允许老用户撞库通过开始日期
     */
    @TableField("hitlib_start_date")
    private Date hitlibStartDate;

    /**
     * 允许老用户撞库通过结束日期
     */
    @TableField("hitlib_end_date")
    private Date hitlibEndDate;

    /**
     * 状态:1-启用;0-禁用
     */
    @TableField("status")
    private Integer status;

    /**
     * 父级ID
     */
    @TableField("parent_id")
    private String parentId;

    /**
     * 是否开通API接入 N-否 Y-是
     */
    @TableField("api_flag")
    private String apiFlag;

    /**
     * 签名类型:MD5,RSA
     */
    @TableField("sign_type")
    private String signType;

    /**
     * 应用注册页URL
     */
    @TableField("register_url")
    private String registerUrl;

    /**
     * 应用下载页URL
     */
    @TableField("download_url")
    private String downloadUrl;

    /**
     * 授信额度
     */
    @TableField("quota")
    private String quota;

    /**
     * 单价
     */
    @TableField("unit_price")
    private BigDecimal unitPrice;

    /**
     * 规则设计
     */
    @TableField("rule_data")
    private String ruleData;

    /**
     * 节点值
     */
    @TableField("node_val")
    private Integer nodeVal;

    /**
     * 用户实数
     */
    @TableField("user_count")
    private Integer userCount;

    /**
     * 用户路由统计数
     */
    @TableField("user_count_rule")
    private Integer userCountRule;

    /**
     * 短信模版编号
     */
    @TableField("sms_temp_id")
    private String smsTempId;

    /**
     * 是否被执行名单 Y:是 N:否
     */
    @TableField("executed_list")
    private String executedList;

    /**
     * 联系人
     */
    @TableField("contact_name")
    private String contactName;

    /**
     * 联系电话
     */
    @TableField("contact_tel")
    private String contactTel;

    /**
     * 联系地址
     */
    @TableField("address")
    private String address;

    /**
     * 代付通道ID
     */
    @TableField("proxypay_channel_id")
    private String proxypayChannelId;

    /**
     * 是否独立金融产品利率 Y-独立 N-否
     */
    @TableField("product_loan_flag")
    private String productLoanFlag;

    /**
     * 协议支付通道ID
     */
    @TableField("pay_channel_id")
    private String payChannelId;

    /**
     * 分期通道ID
     */
    @TableField("bill_channel_id")
    private String billChannelId;

    /**
     * 分账配置 参考对象PartnerFundData
     */
    @TableField("fund_data")
    private String fundData;

    /**
     * APP版本 OFFICIAL-正式版 VERIFY-审核版
     */
    @TableField("app_version")
    private String appVersion;

    /**
     * app参数
     */
    @TableField("app_params")
    private String appParams;

    /**
     * 排序
     */
    @TableField("sort")
    private Integer sort;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    /**
     * 工作空间ID
     */
    @TableField("workspace_id")
    private String workspaceId;

    /**
     * 删除标记：y-已删, n-正常
     */
    @TableField(fill = FieldFill.INSERT)
    @TableLogic(value = "n", delval = "y")
    private String deleted;
}